package com.qingmeng.portal.enums;

import com.qingmeng.common.api.IErrorCode;

/**
 * 用户注册过程中可能出现的结果
 */
public enum RegisterResult implements IErrorCode {
    REG_SUCCESS(0,"注册成功"),
    USERNAME_EXIST(1,"该用户名已经存在"),
    REG_FAILED(2,"该用户注册失败");

    private final long code;
    private final String message;

    RegisterResult(long code, String message) {
        this.code = code;
        this.message = message;
    }


    @Override
    public long getCode() {
        return code;
    }

    @Override
    public String getMessage() {
        return message;
    }
}
